package com.woniu.user.service;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.woniu.result.Result;
import com.woniu.user.infra.model.Address;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu.user.service.dto.AddressDto;
import com.woniu.user.service.param.InsertAddressServiceParam;
import com.woniu.user.service.param.UpdateServiceAddress;

import java.util.List;

/**
 * <p>
 * 地址表 服务类
 * </p>
 *
 * @author Lucas
 * @since 2022-11-26
 */
public interface AddressService extends IService<Address> {
    //查看用户地址
    public List<AddressDto> listUserAddress(Integer userId, Integer addressId);
    //新增地址
    public boolean insertAddress(InsertAddressServiceParam insertAddressServiceParam);
    //设为默认地址
    public boolean defultAddress(Integer addressId);

    //修改地址
    public boolean updateAddress(UpdateServiceAddress updateAddress);

    //删除地址
    public boolean deleteAddress(Integer addressId);

    AddressDto getUserAddressById(Integer addressId);
}
